﻿<Application 
    x:Class="MyDeeWeibo.App"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"       
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:MyDeeWeibo"
    xmlns:system="clr-namespace:System;assembly=mscorlib"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone">

    <!--Application Resources-->
    <Application.Resources>
        <system:String x:Key="AppName">Dee Weibo</system:String>
        <local:WeiboSettings x:Key="AppSettings"></local:WeiboSettings>
        <Style x:Key="BackgroundStyle" TargetType="Grid">
        	<Setter Property="Background">
        		<Setter.Value>
        			<LinearGradientBrush EndPoint="0.5,1" MappingMode="RelativeToBoundingBox" StartPoint="0.5,0">
        				<GradientStop Color="White" Offset="0.3"/>
                        <GradientStop Color="{Binding Source={StaticResource AppSettings}, Path=colorSaved, Mode=TwoWay}" />
                    </LinearGradientBrush>
        		</Setter.Value>
        	</Setter>
        </Style>
    </Application.Resources>

    <Application.ApplicationLifetimeObjects>
        <!--Required object that handles lifetime events for the application-->
        <shell:PhoneApplicationService 
            Launching="Application_Launching" Closing="Application_Closing" 
            Activated="Application_Activated" Deactivated="Application_Deactivated"/>
    </Application.ApplicationLifetimeObjects>

</Application>